package com.ljph.ljaker.enums;

/**
 * Created by yuzhou on 16/9/18.
 */
public enum UserState {

    NORMAL(0, "正常"),
    DISABLED(1, "禁用");

    private int state;
    private String label;
    public int getState() {
        return state;
    }
    public String getLabel() {
        return label;
    }

    UserState(int state, String label){
        this.state = state;
        this.label = label;
    }

    public static UserState stateOf(int state){
        for(UserState value : values()) {
            if(value.getState() == state) {
                return value;
            }
        }
        return null;
    }
}
